package org.ellwood.core.common.result;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serial;
import java.io.Serializable;
import java.util.List;

/**
 * @ProjectName: ellwood-boot-pro
 * @PackageName: org.ellwood.core.common.entity
 * @ClassName: PageResult
 * @Description: // 分页对象
 * @Author: Ellwood
 * @CreateDate: 2024/6/13 - 下午3:18
 * @Version: V1.0.0
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class PageResult<T> implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description ="当前页")
    private long current;

    @Schema(description ="每页条数")
    private long limit;

    @Schema(description ="总页数")
    private long totalPage;

    @Schema(description ="总条数")
    private long total;

    @Schema(description ="结果集")
    private List<T> rows;

    @Schema(description ="额外参数")
    private Object param;

}
